#pragma once
//============================================================================
// Copyright (C) 2003-2013 Brett R. Jones 
// All Rights Reserved
//
// You may redistribute and/or modify for non commercial and commercial uses 
// provided this copyright notice remains in place and is not modified
//
// This code is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
//
// brettjones1900@gmail.com
// http://www.p2panarchy.com
//============================================================================

#pragma pack(push) 
#pragma pack(1)
class PktItemSettingReq : public VxPktHdr
{
public:
	PktItemSettingReq()
	{
		m_u16PktType = PKT_TYPE_ITEM_SETTING_REQ;
		m_u16PktLen = sizeof(PktItemSettingReq);
	}
	void CalcPktLen( int iItemLen )
	{
		//calculate length of packet from length of file data
		m_u16PktLen = (unsigned short)ROUND_TO_16BYTE_BOUNDRY( sizeof( PktItemSettingReq ) - MAX_ITEM_SETTING_LEN  + iItemLen );
		u16ItemLength = iItemLen;
	}
	U16 u16ItemLength;
	U32 u32ModifiedTime;
	char as8ItemData[ MAX_ITEM_SETTING_LEN ]; // place holder for actual data whose length is dynamically determined
};
#pragma pack(pop)


